Path: blob/master/src/packages/next/pages/licenses/[[...page]].tsx
1450 views
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Layout } from "antd";67import { capitalize } from "@cocalc/util/misc";8import Footer from "components/landing/footer";9import Head from "components/landing/head";10import Header from "components/landing/header";11import Licenses from "components/licenses/layout";12import { Customize } from "lib/customize";13import withCustomize from "lib/with-customize";1415export default function Preferences({ customize, page }) {16const subpage = page[0] != null ? ` – ${capitalize(page[0])}` : "";1718return (19<Customize value={customize}>20<Head title={`Licenses${subpage}`} />21<Layout>22<Header />23<Licenses page={page} />24<Footer />25</Layout>26</Customize>27);28}2930export async function getServerSideProps(context) {31let { page } = context.params;32if (page == null) {33page = [];34}3536return await withCustomize({ context, props: { page } });37}383940